<template>
  <div>
    <div class="page">
      <!-- 顶部菜单 -->
      <div class="title_div">
        <div class="title_item">
          <div class="title_add_act" @click.stop="handleClickTagMgr">
            <img class="icon_add_1" src="~@/assets/images/domain_tag_mgr.png" />
            <div class="icon_add_2">
              <div class="icon_text" style="color: #724eff">标签管理</div>
            </div>
          </div>
        </div>
        <div class="title_item">
          <div class="title_add_act" @click.stop="handleClickTagGrp">
            <img class="icon_add_1" src="~@/assets/images/domain_sys_mgr.png" />
            <div class="icon_add_2">
              <div class="icon_text" style="color: #ff9f46">标签分组</div>
            </div>
          </div>
        </div>
        <div class="title_item">
          <div class="title_add_act" @click.stop="handleClickTagActivity">
            <img class="icon_add_1" src="~@/assets/images/icon_add_2.png" />
            <div class="icon_add_2">
              <div class="icon_text" style="color: rgb(64, 158, 255)">标签全案</div>
            </div>
          </div>
        </div>
      </div>

      <!-- 内容 -->
      <div class="content">
        <tag-mgr v-if="pages.pageTagMgr.popMe"></tag-mgr>
        <tag-group v-if="pages.pageTagGrp.popMe"></tag-group>
        <tag-activity v-if="pages.pageActivity.popMe"></tag-activity>
      </div>
    </div>
  </div>
</template>

<script>
import TagActivity from './TagActivity.vue';
import TagGroup from './TagGroup.vue';
import TagMgr from './TagManager.vue';

export default {
  name: 'SysTagsMgr', // 标签管理
  components: { 'tag-mgr': TagMgr, 'tag-group': TagGroup, 'tag-activity': TagActivity },
  data() {
    return {
      pages: {
        pageTagMgr: {
          popMe: true,
        },
        pageTagGrp: {
          popMe: false,
        },
        pageActivity: {
          popMe: false,
        },
      },
    };
  },
  computed: {},
  async created() {},
  mounted() {},
  methods: {
    handleClickTagMgr: async function () {
      this.pages.pageTagMgr.popMe = true;
      this.pages.pageTagGrp.popMe = false;
      this.pages.pageActivity.popMe = false;
    },
    handleClickTagGrp: async function () {
      this.pages.pageTagMgr.popMe = false;
      this.pages.pageTagGrp.popMe = true;
      this.pages.pageActivity.popMe = false;
    },
    handleClickTagActivity: async function () {
      this.pages.pageTagMgr.popMe = false;
      this.pages.pageTagGrp.popMe = false;
      this.pages.pageActivity.popMe = true;
    },
  },
};
</script>

<style lang="scss" scoped>
$page_font_family: 微软雅黑 宋体 思源黑体 Noto Sans SC-Medium;
$title-label-size: 0.27333rem;
$mid_title_color_overtime: #ff5b5b;
$mid_title_color_complete: #724eff;
$mid_title_color_not_participated: #f29339;

.page {
  width: 100%;
  height: 100%;
  background-color: #f8f8fa;
  padding: 5px 10px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.page_filter {
  height: 800px;
  overflow: hidden;
}

.title_div {
  width: 100%;
  height: 60px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  background-color: #f8f8fa;
  border-radius: 4px 4px 4px 4px;
}

.title_item {
  width: 220px;
  height: auto;
  margin: 0 0;
  padding: 5px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .title_add_act {
    width: 100%;
    height: auto;
    opacity: 1;
    /* 自动布局 */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0px;
    gap: 20px;
    cursor: pointer;

    .icon_add_1 {
      width: $title-label-size;
      height: $title-label-size;
    }

    .icon_add_2 {
      .icon_text {
        width: 100%;
        height: 100%;
        color: #165dff;
        opacity: 1;
        display: block;
        font-family: $page_font_family;
        font-size: 26px;
        font-weight: 500;
        line-height: 48px;
        letter-spacing: 0px;
        z-index: 1;
      }
    }
  }
}

.content {
  width: 100%;
  height: auto;
  position: relative;
}
</style>
